Recently, people rely on personal computers (PC) for work and entertainment. Word processing programs, multimedia players, games, and increasingly, home networking applications are just a few examples of the most commonly used applications. Consequently, at any given moment, a user may be listening to music, composing a document and surfing the Internet in a single user session. Fortunately, modem PC operating systems, such as Microsoft's Windows® or the Linux® operating systems are able to multitask such that many applications, and more specifically, each of their constituent threads, seemingly execute concurrently. A thread is a portion of computer code an application needs processed by the central processing unit of a computer.
Most computer processors are only able to execute one thread at a time so modem operating systems rapidly switch between available threads giving the appearance of concurrent execution, otherwise known as multitasking. Multitasking in a computer is accomplished by an operating system component called the scheduler or also known as the process manager. The scheduler is responsible for: 1) evaluating which thread to run; and 2) switching the threads, if necessary. The time period between evaluations is called the scheduler quantum value and the switching of threads is called a context switch. The scheduler makes the context switch between different threads if any of these three occur: 1) a specific duration or quantum of time (scheduler quantum value) has occurred; 2) the thread has given up the CPU voluntarily (e.g., application is closed or the thread goes into an idle state); or 3) the thread is preempted by a higher priority thread.
A problem arises, however, when a particular application does not get a sufficient quantum of time, defined by the scheduler quantum value, to properly execute before another evaluation occurs. For example, a multimedia application playing music may not have a sufficient quantum of time to efficiently execute its thread before another scheduler evaluation. As a result, the user is dissatisfied when the music does not play properly. If the application has too large a quantum value, it may be consuming more time than it really needs to execute efficiently and other concurrently running applications may appear sluggish. In some cases, the application or system may crash.
One solution has been for application designers to provide a specific scheduler quantum to the OS to utilize while running their application. However, these fixed values do not take into account what other applications may be concurrently running and are essentially a best guess. For example, if an OS utilized only one application's specific fixed quantum value, other applications concurrently executing may not adequately perform to a user's expectations or the fixed value may not provide adequate scheduling to accommodate for the wide variety of other applications that may be running.